package com.cindata

import com.cindata.dictionary.*

class WorkflowStage
{
    Integer executionSequence
    // CollateralStage stage

    FlowStage stage

    Boolean canReject = true
    Layout layout
    // Document document

    static belongsTo = [workflow: Workflow]

    static hasMany = [conditions: WorkflowStageCondition, events: WorkflowStageEvent, roles: WorkflowStageRole, notifications: WorkflowStageNotification]

    static constraints = {
        executionSequence unique: ['workflow'], min: 1, max: 10000
        stage unique: ['workflow']
        layout nullable: true, blank: true
        canReject nullable: true, blank: true
        // document nullable: true, blank: true
    }

    static mappedBy = [conditions: 'workflowStage']

    static mapping = {}
}
